﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Emerson.Storage.Service
{
    /// <summary>
    /// The specified entity cannot be found in the database or any data source
    /// </summary>
    public class EntityNotFoundException : Exception
    {
        private string _entityType;
        private int _entityId;
        public EntityNotFoundException(string entityType, int entityId)
        {
            _entityId = entityId;
            _entityType = entityType;
        }

        public EntityNotFoundException()
        {
        }

        public override string Message
        {
            get
            {
                return "The specified entity cannot be found, maybe this entity is deleted by others. Entity Type:" + _entityType + ", Entity Id:" + _entityId.ToString();
            }
        }
    }
}
